﻿using System;
using K9Nano.Domain;
using Microsoft.AspNetCore.Identity;

namespace K9Nano.Authentication
{
    public class Role : IdentityRole<Guid>, IEntity<Guid>, IDeletionAudited, ICreationAudited, IMayHaveTenant
    {
        public bool IsDeleted { get; set; }
        public Guid? DeleterUserId { get; set; }
        public DateTimeOffset? DeletionTime { get; set; }
        public Guid? CreatorUserId { get; set; }
        public DateTimeOffset CreationTime { get; set; }
        public Guid? TenantId { get; set; }

        public virtual bool IsTransient() => Id == Guid.Empty;
    }
}